﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;
using System.Drawing;
using System.IO;

namespace BeerScanatronUI
{
    static class ResourceHelper
    {
        public static Bitmap GetBitmapFromResources(string name)
        {
            Bitmap image = null;

            Assembly assembly = Assembly.GetExecutingAssembly();
            using (Stream stream = assembly.GetManifestResourceStream("BeerScanatronUI.Resources." + name))
            {
                image = new Bitmap(stream);
            }

            return image;
        }
    }
}
